﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _20170207_DbConnection
{
    class Program
    {
        static void Main(string[] args)
        {
            /*
            DatabaseConnection mySqlConnection = new MySqlConnection("123", new TimeSpan(0,0,4));
            DatabaseConnection msSqlConnection = new MsSqlConnection("777", new TimeSpan(0, 0, 6));

            mySqlConnection.OpenConnection();
            msSqlConnection.OpenConnection();

            msSqlConnection.CloseConnection();
            mySqlConnection.CloseConnection();
            */

            DatabaseCommand mySqlCommand = new DatabaseCommand
                (new MySqlConnection("123", new TimeSpan(0, 0, 4)), "SELECT * FROM Table1");
            mySqlCommand.Execute();

            Console.WriteLine();

            DatabaseCommand msSqlCommand = new DatabaseCommand
                (new MsSqlConnection("777", new TimeSpan(0, 0, 6)), "SELECT * FROM Table2");
            msSqlCommand.Execute();
            
        }
    }
}
